<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        function Person(name,age){
           //给实例对象 添加私有属性和方法
           this.name=name;
           this.age=age;
        }
        //原型对象 添加公有属性和方法
        Person.prototype.num=100;
        Person.prototype.show=function(){}

        //静态属性和方法
        Person.str="hello"

        let p = new Person("lili",18)

        // console.dir(Person);
        //console.log(p);
    </script>
</body>
</html>